<template>
    <div>
        <div class="goods-list">
            <goods-item v-for="item in goodsData" :key="item.id" :goodsInfo="item" />
        </div>
        <div class="none" v-if="goodsData.length==0">暂无商品</div>
    </div>
    
</template>

<script>
    import goodsItem from './goods-item.vue'
    export default {
        props: ['goodsData'],
        components: {
            goodsItem
        }
    };
</script>

<style scoped lang="less">
    .goods-list{
        display: flex;
        flex-wrap: wrap;
    }

    .none{
        padding: 20px 0;
        text-align: center;
    }
</style>